package br.com.sistema.entity;

import javax.persistence.Column;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.DiscriminatorType;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table(name="vendedor")
@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name="tipo_pessoa", length=1, discriminatorType=DiscriminatorType.STRING)
@DiscriminatorValue("F")
public class Vendedor {
	
	@Id
	@GeneratedValue(strategy=GenerationType.SEQUENCE)
	private Integer vendedorid;
	
	@Column(name="vendedor_senha", length=9)
	private String senha;
	

	@OneToOne
	private Endereco endereco;
	
	public Vendedor() {
	}

	public Integer getVendedorid() {
		return vendedorid;
	}

	public void setVendedorid(Integer vendedorid) {
		this.vendedorid = vendedorid;
	}

	public String getSenha() {
		return senha;
	}

	public void setSenha(String senha) {
		this.senha = senha;
	}

	public Endereco getEndereco() {
		return endereco;
	}

	public void setEndereco(Endereco endereco) {
		this.endereco = endereco;
	}



	
}
